package mornd.test3;

import org.springframework.beans.SimpleTypeConverter;

import java.util.Date;

/**
 * @author: mornd
 * @dateTime: 2023/5/7 - 22:51
 */
public class SimpleTypeConverterDemo {
    public static void main(String[] args) {
        // 仅有转换类型的功能
        SimpleTypeConverter simpleTypeConverter = new SimpleTypeConverter();
        Integer v1 = simpleTypeConverter.convertIfNecessary("123", int.class);
        Date  v2 = simpleTypeConverter.convertIfNecessary("2000/1/12", Date.class);
        System.out.println(v1);
        System.out.println(v2);
    }
}
